package com.oowoo.mq2es.entity;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.time.LocalDateTime;

/*
 * @Author ZhangBin
 * @Date 2019/12/7 0:22
 * @Description: 将kafka消息转化为实体类
 * 
 **/
@Data
@Document(indexName = "blogtag", type = "blogtagtype",shards = 5,replicas = 0)
public class BlogTagEntity {
    @Id
    private Integer id;
    @Field
    private String tagCode;
    @Field
    private String tagName;
    @Field(type = FieldType.Date,format = DateFormat.custom, pattern ="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    @Field(type = FieldType.Date,format = DateFormat.custom, pattern ="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
}
